<template>
	<view>
		<view class="" style="font-size: 0;">
			
		</view>
		<view class="" v-for="(item,index) in list" style="margin: 0 30rpx;padding: 24rpx 0;border-bottom: 2rpx solid #F4F4F4;">
			<view class="" style="display: flex;align-items: center;justify-content: space-between;">
				<view class="" style="font-size: 32rpx;color: #252628;">
					{{item.gift.name}}：+{{item.number}}
				</view>
				<view class="" style="font-size: 32rpx;color: #DF5046;">
					-{{item.price}}元
				</view>
			</view>
			<view class="" style="display: flex;align-items: center;justify-content: space-between;">
				<view class="" style="font-size: 24rpx;color: #999;">
					充值时间：{{item.created_at}}
				</view>
				<view class="" style="font-size: 24rpx;color: #999;">
					赠送人：{{item.doctor.name}}
				</view>
			</view>
		</view>
		<view v-if="list.length==0" style="padding-top: 500rpx;" class="">
		    <u-empty text="列表数据为空" mode="list"></u-empty>
		   </view>
	</view>
</template>

<script>
	import { gift } from '../../api/common.js';
	export default {
		data() {
			return {
				list:[]
			}
		},
		onShow() {
			this.getList();
		},
		methods: {
			getList(){
				gift().then(res=>{
					if(res.code == 200001){
						this.list = res.data.data;
					}
				})
			}
		}
	}
</script>

<style>
.page_view{
	width: 100%;
	padding: 0 30rpx;
}
.list_item{
	width: 100%;
	padding: 30rpx 0;
	box-sizing: border-box;
}
.list_item_top_left{
	color: #252628;
	font-family: Alibaba PuHuiTi 2.0;
	font-size: 32rpx;
	font-weight: 400;
}
</style>
